package com.taobao.app.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpSession;

//退出登录
@Controller
public class LogoutController {
    @PostMapping("/logout")
    public String out(HttpSession session) {
        session.invalidate();
        return "index";
    }
}
